<!doctype html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="__ADMIN__/css/base.css" />
<link rel="stylesheet" href="__ADMIN__/css/info-mgt.css" />
<link rel="stylesheet" href="__ADMIN__/css/WdatePicker.css" />
<title>移动办公自动化系统</title>
<style type='text/css'>
	table tr .id{ width:63px; text-align: center;}
	table tr .name{ width:118px; padding-left:17px;}
	table tr .nickname{ width:63px; padding-left:17px;}
	table tr .dept_id{ width:63px; padding-left:13px;}
	table tr .sex{ width:63px; padding-left:13px;}
	table tr .birthday{ width:80px; padding-left:13px;}
	table tr .tel{ width:113px; padding-left:13px;}
	table tr .email{ width:160px; padding-left:13px;}
	table tr .addtime{ width:160px; padding-left:13px;}
	table tr .operate{ padding-left:13px;}
</style>
</head>

<body>
<div class="title"><h2>公文管理</h2></div>
<div class="table-operate ue-clear">
	<a href="__CONTROLLER__/add" class="add">添加</a>
    <a href="javascript:;" class="del">删除</a>
    <a href="javascript:;" class="edit">编辑</a>
    <a href="javascript:;" class="count">统计</a>
    <a href="javascript:;" class="check">审核</a>
</div>
<div class="table-box">
	<table>
    	<thead>
        	<tr>
            	<th class="id">序号</th>
                <th class="name">标题</th>
                <th class="name">附件</th>
                <th class="content">作者</th>
				<th class="addtime">添加时间</th>
                <th class="operate">操作</th>
            </tr>
        </thead>
        <tbody>
            <foreach name="result" item="v" key="k">
                <tr>
                    <td class="id">{$v.id}</td>
                    <td class="name">{$v.title|msubstr=0,8}</td>
                   <!--  <td class="file"><if condition="$v.hasfile == 1">{$v.filename}【<a href="__CONTROLLER__/download/id/{$v.id}">下载</a>】</if></td> -->
                   <td class="file">
                        <notempty name="v.filename">{$v.filename}【<a href="__CONTROLLER__/download/id/{$v.id}">下载</a>】</notempty>
                   </td>
                    <td class="content">{$v.author}</td>
                    <td class="addtime">{$v.addtime|date='Y-m-s H:i:s',###}</td>
                    <td class="operate">
                        <a href ='javascript:;'  class="show" data="{$v.id}" data-title="{$v.title}">查看</a> |
                        <a href ='__CONTROLLER__/edit/id/{$v.id}'>编辑</a>
                    </td>
                </tr>
            </foreach>
        </tbody>
    </table>
</div>
<div class="pagination ue-clear">
	<div class="pagin-list">
		{$page}
	</div>
	<div class="pxofy">共 {$count} 条记录</div>
</div>
</body>
<script type="text/javascript" src="__ADMIN__/js/jquery.js"></script>
<script type="text/javascript" src="__ADMIN__/js/common.js"></script>
<script type="text/javascript" src="__ADMIN__/js/WdatePicker.js"></script>
<script type="text/javascript" src="__ADMIN__/layer/layer.js"></script>
<script type="text/javascript">
$(".select-title").on("click",function(){
	$(".select-list").hide();
	$(this).siblings($(".select-list")).show();
	return false;
})
$(".select-list").on("click","li",function(){
	var txt = $(this).text();
	$(this).parent($(".select-list")).siblings($(".select-title")).find("span").text(txt);
})

$("tbody").find("tr:odd").css("backgroundColor","#eff6fa");

showRemind('input[type=text], textarea','placeholder');

$('.show').on('click',function(){
    var id=$(this).attr('data');
    var title=$(this).attr('data-title');
    layer.open({
        type:2,
        title:title,
        shadeClose:true,
        shade:0,
        area:['560px','90%'],
        content:'__CONTROLLER__/showContent/id/'+id
    });
});
$.ajax({
    type: 'post',
    url: "{:U('Doc/date')}",
    dataType:'json',
    data: {
        'api_price_id': 1
    },
    success: function(data) {
        console.log(data);
    },
    error:function(re){
        // console.log(1);
    }
});
</script>
</html>
